import { NgModule, isDevMode } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { en_US } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import en from '@angular/common/locales/en';
import { FormsModule, ReactiveFormsModule} from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS  } from '@angular/common/http';
import { BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations';
import { StoreModule } from '@ngrx/store';
import { LayoutComponent } from './layout/layout.component';
import { TestAComponent } from './testA/testA.component';
import { MyNgZorroAntdModule } from './ng-zorro-antd.module'
import { AppRoutingModule } from "./app-routing.module";
import { TestBComponent } from './testB/testB.component';
import { TestCComponent } from './testC/testC.component';
import {LetModule, PushModule} from '@ngrx/component';
import { StoreRouterConnectingModule } from '@ngrx/router-store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { EffectsModule } from '@ngrx/effects';
import {effects, reducers} from "./store/store";
import { TestDComponent } from './testD/testD.component';
import { UserListComponent } from './user-list/user-list.component';
import { UserList2Component } from './user-list2/user-list2.component';
import {MockHttpInterceptor} from "./service/mock-http-interceptor";

registerLocaleData(en);

@NgModule({
  declarations: [
    AppComponent,
    LayoutComponent,
    TestAComponent,
    TestBComponent,
    TestCComponent,
    TestDComponent,
    UserListComponent,
    UserList2Component
  ],
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    StoreModule.forRoot(reducers),
    EffectsModule.forRoot(effects),
      MyNgZorroAntdModule,
    AppRoutingModule,
    NoopAnimationsModule,
    StoreRouterConnectingModule.forRoot(),
    StoreDevtoolsModule.instrument(),
    LetModule,
    PushModule
  ],
  providers: [
    { provide: NZ_I18N, useValue: en_US },
    { provide: HTTP_INTERCEPTORS, useClass: MockHttpInterceptor, multi: true }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
